#!/bin/sh
mvn -U clean package -DskipTests=true
if [ ! -d "./target/config" ] ; then
  mkdir ./target/config
fi
if [ ! -d "./target/docker" ] ; then
  mkdir ./target/docker
  mkdir ./target/docker/config
fi
cp ./src/main/resources/application*.yml ./target/docker/config
cp ./start.sh ./target/start.sh
cp ./build-docker.sh ./target/docker/build-docker.sh
cp ./Dockerfile ./target/docker/Dockerfile
cp ./target/server.jar ./target/docker/server.jar
cd ./target
zip server.zip ./docker/server.jar ./docker/Dockerfile ./start.sh ./docker/config/application*.yml ./docker/build-docker.sh
